package com.yytek.am.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yytek.am.mapper.FmDefRlobjectMapper;
import com.yytek.am.domain.FmDefRlobject;
import com.yytek.am.service.IFmDefRlobjectService;

/**
 * 告警定义关联设备Service业务层处理
 * 
 * @author yytek-iot
 * @date 2022-10-10
 */
@Service
public class FmDefRlobjectServiceImpl implements IFmDefRlobjectService 
{
    @Autowired
    private FmDefRlobjectMapper fmDefRlobjectMapper;

    /**
     * 查询告警定义关联设备
     * 
     * @param alarmDefineId 告警定义关联设备主键
     * @return 告警定义关联设备
     */
    @Override
    public FmDefRlobject selectFmDefRlobjectByAlarmDefineId(Long alarmDefineId)
    {
        return fmDefRlobjectMapper.selectFmDefRlobjectByAlarmDefineId(alarmDefineId);
    }

    /**
     * 查询告警定义关联设备列表
     * 
     * @param fmDefRlobject 告警定义关联设备
     * @return 告警定义关联设备
     */
    @Override
    public List<FmDefRlobject> selectFmDefRlobjectList(FmDefRlobject fmDefRlobject)
    {
        return fmDefRlobjectMapper.selectFmDefRlobjectList(fmDefRlobject);
    }

    /**
     * 新增告警定义关联设备
     * 
     * @param fmDefRlobject 告警定义关联设备
     * @return 结果
     */
    @Override
    public int insertFmDefRlobject(FmDefRlobject fmDefRlobject)
    {
        return fmDefRlobjectMapper.insertFmDefRlobject(fmDefRlobject);
    }

    /**
     * 修改告警定义关联设备
     * 
     * @param fmDefRlobject 告警定义关联设备
     * @return 结果
     */
    @Override
    public int updateFmDefRlobject(FmDefRlobject fmDefRlobject)
    {
        return fmDefRlobjectMapper.updateFmDefRlobject(fmDefRlobject);
    }

    /**
     * 批量删除告警定义关联设备
     * 
     * @param alarmDefineIds 需要删除的告警定义关联设备主键
     * @return 结果
     */
    @Override
    public int deleteFmDefRlobjectByAlarmDefineIds(Long[] alarmDefineIds)
    {
        return fmDefRlobjectMapper.deleteFmDefRlobjectByAlarmDefineIds(alarmDefineIds);
    }

    /**
     * 删除告警定义关联设备信息
     * 
     * @param alarmDefineId 告警定义关联设备主键
     * @return 结果
     */
    @Override
    public int deleteFmDefRlobjectByAlarmDefineId(Long alarmDefineId)
    {
        return fmDefRlobjectMapper.deleteFmDefRlobjectByAlarmDefineId(alarmDefineId);
    }

    /**
     * 批量新增告警定义关联设备
     * @param fmDefRlobjectList
     * @return
     */
    @Override
    public int insertFmDefRlobjectList(List<FmDefRlobject> fmDefRlobjectList) {
        return fmDefRlobjectMapper.batchFmDefRlobject(fmDefRlobjectList);
    }

    /**
     * 删除关联设备
     * @param fmDefRlobject
     * @return
     */
    @Override
    public int deleteFmDefRlobject(FmDefRlobject fmDefRlobject) {
        return fmDefRlobjectMapper.deleteFmDefRlobject(fmDefRlobject);
    }

}
